package com.ugoodtech.mdcc.web.service;

/* Copyright (C) Ugoodtech, Inc - All Rights Reserved.
 * Unauthorized copying of this file, via any medium is strictly prohibited.
 * Proprietary and confidential.
 * Written by Stone Shaw.
 */

import com.ugoodtech.mdcc.core.domain.Department;
import com.ugoodtech.mdcc.core.domain.UserProfile;
import com.ugoodtech.mdcc.core.exception.VStarException;
import com.ugoodtech.mdcc.web.dto.JsonResponse;
import io.swagger.annotations.ApiParam;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

public interface UserProfileService {

    Page<UserProfile> querySystemUser(@ApiParam("类型") @RequestParam(value = "userType", required = false) String userType,
                                      @ApiParam("员工编号") @RequestParam(value = "code", required = false) String code,
                                      @ApiParam("姓名") @RequestParam(value = "name", required = false) String name,
                                      @ApiParam("手机号码") @RequestParam(value = "telephone", required = false) String telephone,
                                      @ApiParam("关联部门") @RequestParam(value = "departmentIds", required = false) Long departmentIds, Pageable pageable);

    JsonResponse userInfoExport(@ApiParam("员工编号") @RequestParam(value = "code", required = false) String code,
                                @ApiParam("姓名") @RequestParam(value = "name", required = false) String name,
                                @ApiParam("手机号码") @RequestParam(value = "telephone", required = false) String telephone,
                                @ApiParam("关联部门") @RequestParam(value = "departmentIds", required = false) Long departmentIds);

    Page<UserProfile> queryAadminSystemUser(@ApiParam("类型") @RequestParam(value = "userType", required = false) String userType,
                                            @ApiParam("员工编号") @RequestParam(value = "code", required = false) String code,
                                            @ApiParam("姓名") @RequestParam(value = "name", required = false) String name,
                                            @ApiParam("手机号码") @RequestParam(value = "telephone", required = false) String telephone,
                                            @ApiParam("关联部门") @RequestParam(value = "departmentIds", required = false) Long[] departmentIds, Pageable pageable);

    JsonResponse createSystemUser(String code, String name, String telephone, Long departmentList, Long roleId) throws VStarException;
    UserProfile createOutSideUser(String userType,String code, String name, String telephone, List<Department> departmentList) throws VStarException;
    UserProfile queryOneUserProfile(String userNo, String name) throws VStarException;
    List<Long> queryLikeUserProfile(String name);
    List<Long> queryLikeUserId(String name);
}
